<template>
	<view class="page">
		<view class="flex justify-center fixed-bottom mx-2 mb-10" @click="logout">
			<button class="flex justify-center rounded" style="height: 80rpx;width: 100%;background-color: #ff5039;">
				<text class="font text-white">退出</text>
			</button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			}
		},
		methods: {
			// 登出
			logout() {
				uni.showModal({
					title: '提示',
					content: '是否要退出登陆？',
					cancelText: '不退出',
					confirmText: '退出',
					success: res => {
						if(res.confirm){
							this.$store.commit('logout');
							this.$store.dispatch('logout2');
							uni.reLaunch({ url: '../login/login' })
						}
					},
				});
			}
		}, // end methods
	}
</script>

<style>

</style>
